using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;

namespace ConsoleApplication11.Models.Mapping
{
    public class sportMap : EntityTypeConfiguration<sport>
    {
        public sportMap()
        {
            // Primary Key
            this.HasKey(t => t.sport_id);

            // Properties
            this.Property(t => t.sport_name)
                .HasMaxLength(50);

            // Table & Column Mappings
            this.ToTable("sport");
            this.Property(t => t.sport_id).HasColumnName("sport_id");
            this.Property(t => t.sport_name).HasColumnName("sport_name");
            this.Property(t => t.met_value).HasColumnName("met_value");
        }
    }
}
